From 45b712c3d32f5b0b3d344e9915a78a7d97b27d62 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 27 Jun 2007 22:20:17 +0100 Subject: [PATCH] hvm: Destroy timers early during domain death. Signed-off-by: Keir Fraser --- xen/arch/x86/hvm/hvm.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 2d730f6682..71ca313f8a 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -242,6 +242,11 @@ void hvm_domain_relinquish_resources(struct domain *d) { hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.ioreq); hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.buf_ioreq); + + pit_deinit(d); + rtc_deinit(d); + pmtimer_deinit(d); + hpet_deinit(d); } void hvm_domain_destroy(struct domain *d) @@ -421,17 +426,6 @@ int hvm_vcpu_initialise(struct vcpu *v) void hvm_vcpu_destroy(struct vcpu *v) { - struct domain *d = v->domain; - - if ( v->vcpu_id == 0 ) - { - /* NB. All these really belong in hvm_domain_destroy(). */ - pit_deinit(d); - rtc_deinit(d); - pmtimer_deinit(d); - hpet_deinit(d); - } - vlapic_destroy(v); hvm_funcs.vcpu_destroy(v); -- 2.30.2